Detailed Description
Structure describing an UDP Socket.
This structure describes a single registered UDP socket. When registering a socket through a call to EMBENET_UDP_RegisterSocket the user is expected to fill all the structure fields EXCEPT the 'next' field, which is used internally by the embeNET stack.
Data Fields | |
uint16_t | port |
EMBENET_UDP_Traffic | handledTraffic: 8 |
EMBENET_GroupId | groupId |
EMBENET_UDP_RxDataHandler | rxDataHandler |
void * | userContext |
EMBENET_UDP_SocketDescriptor * | next |
Field Documentation
◆ port
uint16_t EMBENET_UDP_SocketDescriptor::port |
UDP port number to bind to. This parameter may be in the range of 1 to 65535.
◆ handledTraffic
EMBENET_UDP_Traffic EMBENET_UDP_SocketDescriptor::handledTraffic |
Traffic that will be handled by the socket. Possible options:
- EMBENET_UDP_TRAFFIC_UNICAST - the socket will only receive data sent to the node using unicast destination address
- EMBENET_UDP_TRAFFIC_MULTICAST - the socket will only receive data sent to the node using matching multicast group address
- EMBENET_UDP_TRAFFIC_ALL - the socket will receive data sent to the node using unicast or matching multicast address
◆ groupId
EMBENET_GroupId EMBENET_UDP_SocketDescriptor::groupId |
Multicast group identifier used only when socketType is set to EMBENET_UDP_TRAFFIC_MULTICAST. In such case this identifier determines the multicast group address that the socket will listen to. In other cases this field is ignored and should be set to 0.
◆ rxDataHandler
EMBENET_UDP_RxDataHandler EMBENET_UDP_SocketDescriptor::rxDataHandler |
A mandatory user-defined callback function that will be called every time an UDP datagram is received on the socket. This field must not be NULL.
◆ userContext
void* EMBENET_UDP_SocketDescriptor::userContext |
An optional user-defined context pointer that will be passed to the rxHandler when it is called.
◆ next
EMBENET_UDP_SocketDescriptor* EMBENET_UDP_SocketDescriptor::next |
Field reserved for the network stack. When registering new socket set this field to NULL. Once the socket is registered this field MUST NOT be changed.
The documentation for this struct was generated from the following file:
Generated on Wed Feb 8 2023 19:52:39 for embeNET Border Router C API by 1.9.3